import http from "../utils/request.js";

/**
 * 新建问卷 
 * @param {*} param0 
 */
export function createQuestion({describe1, describe2}) {
  return http.$post("question/saveQuestion",{
    describe1,
    describe2,
  })
}

/**
 * 获取 创建的问卷调查列表
 * @param {*} param0 
 */
export function getQuestionSurveyList({currentPage, showCount, type}) {
  return http.$post("question/getQuestionList",{
    currentPage,
    showCount,
    type,
  })
}
/**
 * 分享二维码获取
 * @param {*} param0 
 */
export function getQuestionqrCode({url, type}) {
  return http.$post("question/getQrUrl",{
    url,
    type
  })
}

/**
 * 删除问卷
 * @param {*} param0 
 * ?splid=8d3e4f9d650343909aa68a89eef2ecf4&question_id=2044&is_delete=1
 */
export function deleteQuestion({splid, question_id}) {
  return http.$post("question/editQuestion",{
    splid,
    question_id,
    is_delete: '1',
  })
}


// export function getquestion({ splid, type, is_delete}) {
//   return http.$post("question/getQuestion",{
//     splid,
//     type,
//     is_delete
//   })
// }